#pragma once

#include "FString.h"
//#include "Vector3D.h"

struct DropLog {};

class Log
{
	const char* name;
	bool FirstTime;
	FString buffer;
	void write (const char* text);

public:
	Log(const char* theName = "log.txt");
	~Log();

	Log& operator << (const FString& str)
	{
		buffer += str;
		return *this;
	}

	Log& operator << (const char* str)
	{
		buffer += str;
		return *this;
	}

	Log& operator << (char ch)
	{
		buffer += ch;
		return *this;
	}

	Log& operator << (bool is)
	{
		if (is)
			buffer += "TRUE";
		else
			buffer += "FALSE";

		return *this;
	}

	Log& operator << (int i);
	Log& operator << (float f);
//	Log& operator << (const Vector3D& vector);

	Log& operator << (const DropLog& end);

};

extern const DropLog	logEndl;
extern		 Log		sysLog;
